1. Field
The present invention relates to a method for compensating image data, and more particularly to a method for carrying out smear reduction or removal for image data received by an image sensor of a digital camera.
2. Related Art
An image sensor applied in a digital camera is often a charge-coupled device (CCD). The image sensor may produce a smear effect adjacent to a corresponding high-light object when sensing a picture of objects of high brightness. FIG. 1 is a schematic view of an image data with the smear effect presented when an image sensor receives a picture of objects of high brightness. Referring to FIG. 1, the image sensor 90 comprises a plurality of photo sensors 92 arranged in an array. When the photo sensors 92 sense a picture of objects of high brightness, object smear pixels 94 and stripe smear pixels 96 appear on the photo sensors corresponding to the objects of high brightness. The object smear pixels 94 and stripe smear pixels 96 lead to the smear effect.
To solve the smear problem, the industry has proposed several solutions, for example, US Patent No. 2006/0274173 A1 published on Dec. 7, 2006 (the patent family of this patent includes Taiwan Patent Publication No. 200707327, PCT WO/2006/123828, and so on), which is entitled “Digital Camera Comprising Smear Removal Function”. It can be seen from the abstract thereof that the disclosed technical solution is that a horizontal evaluation data generation section computes an average value of pixel signals of a vertical optical black region based on arbitrary pixel data of a horizontal optical black region, while a vertical evaluation data generation section computes an average value of pixel signals of the vertical optical black region based on arbitrary pixel data of the vertical optical black region, and the average values are output to an evaluation section respectively. The evaluation section outputs a gain value to a computation section based on a difference of the two transmitted average values. A smear information memory stores the pixel signals of a certain row of the vertical optical black region. The computation section multiplies the pixel data stored in the smear information memory by the transmitted gain value, and subtracts the multiplied pixel data from the pixel data shot by the charge-coupled device (CCD). Therefore, a photography apparatus and program and a smear removal apparatus are implemented, which can determine whether to perform the smear removal and an intensity of the smear removal based on the condition of the smear.
In addition, US Patent Application No. 2007/0242145 published on Oct. 18, 2007, entitled “Smear Reduction In CCD Images”, also disclosed a technology for removing the smear effect in CCD images. This application mainly utilizes a signal change rate in a smear region as the basis for determining a smear region boundary (through comparison with a predetermined value). After the boundary is decided, an adjacent pixel deduction method or an interpolation method is employed to compensate the effective pixels corresponding to the smear region.
Although the above two methods for removing smear can achieve the purpose, they still have the following problems: (a) after compensation, the pixels in the smear region (that is, within the boundary) are artifact and distorted, (b) the compensation effect of the smear region is not smooth enough, and (c) the compensation of a monochromatic high light (for example, pure red, pure blue, pure green) is distorted.